package com.tian.library.test

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import androidx.databinding.DataBindingUtil
import com.tian.library.test.databinding.ActivityMainBinding

/**
 * @author tiansongtao,Email:769001510@qq.com, created on 2020/12/15 14:15
 *
 */
class MainActivity : AppCompatActivity(), View.OnClickListener {

    private lateinit var binding: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this, R.layout.activity_main)
        binding.clickListener = this
    }

    override fun onClick(v: View?) {
        when (v!!) {
            binding.btPermission -> startActivity(Intent(this, PermissionUtilActivity::class.java))
        }
    }

}